from System.Collections.Generic import List
from System import Byte, Int32

def findenemy():
    efilter = Mobiles.Filter()
    efilter.Enabled = True
    efilter.RangeMax = 16
    efilter.Notorieties = List[Byte](bytes([3,4,5,6]))
    enemies = Mobiles.ApplyFilter(efilter)
    if len(enemies)>0:       
        return enemies
    else:
        return False

def attackmobile(mobile): 
    Misc.Pause(300)
    Player.Attack(mobile)
    Misc.Pause(50)
        
while True:        
    enemy =  findenemy()
    if enemy:
       diren = Mobiles.Select(enemy ,'Nearest')
       Player.PathFindTo(diren.Position.X,diren.Position.Y,diren.Position.Z)
       #DRxian = PathFinding.Route()
       #DRxian.X = diren.Position.X
       #DRxian.Y = diren.Position.Y
       #PathFinding.Go(DRxian)
       Misc.Pause(500) 

       if Player.BuffsExist("Enemy Of One"):
          pass
       elif Player.Mana > 20:
          Spells.CastChivalry("Enemy Of One")
          Misc.Pause(2500)

       if Player.BuffsExist("Lightning Strike"):
          pass
       elif Player.Mana > 10 and Player.BuffsExist("Enemy Of One") and Player.Hits > 80:
          Spells.CastBushido("Lightning Strike")
          Misc.Pause(500) 
       
       attackmobile(diren)
    Misc.Pause(1000)